package com.liyuhan.onlinetaxibackground.dto.orderDto;

import com.liyuhan.onlinetaxibackground.POJO.ReceivedOrder;

import java.util.Date;

public class CompletedOrderDto extends ReceivedOrderDto {
    private Integer completeOrderId;

    // 用户到达时间
    private Date arriveTime;

    public CompletedOrderDto(Integer completeOrderId, ReceivedOrder order, String state, Date arriveTime) {
        super(order.getId(), order.getOrder(), state,
                order.getDriver().getCity(), order.getDriver().getAddress(), order.getDriver().getUser().getScore(),
                order.getDriver().getCar().getCarBrand(), order.getDriver().getCar().getCarColor(), order.getDriver().getCar().getCarNumber(),
                order.getPickUpTime(), order.getCancelOrder(), order.getCancelReason()
        );

        this.completeOrderId = completeOrderId;
        this.arriveTime = arriveTime;
    }

    public Integer getCompleteOrderId() {
        return completeOrderId;
    }

    public void setCompleteOrderId(Integer completeOrderId) {
        this.completeOrderId = completeOrderId;
    }
}
